mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20:52 +01:00
dialog autonum, add default text if diagram or project title are empty
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2149 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -27,7 +27,10 @@ diagramselection::diagramselection(QETProject *prj, QWidget *parent) :
|
||||
// list all diagrams presents in project
|
||||
list_diagram_ = prj_ -> diagrams();
|
||||
|
||||
ui -> label_prj -> setText( tr("Projet : ") + prj_ -> title() );
|
||||
QString project_title = prj_ -> title();
|
||||
if (project_title.isEmpty()) project_title = tr("Projet sans titre");
|
||||
|
||||
ui -> label_prj -> setText( tr("Projet : ") + project_title );
|
||||
load_TableDiagram();
|
||||
}
|
||||
|
||||
@@ -63,7 +66,10 @@ void diagramselection::load_TableDiagram() {
|
||||
QTableWidgetItem *item_Name = new QTableWidgetItem();
|
||||
QTableWidgetItem *item_State = new QTableWidgetItem();
|
||||
|
||||
item_Name -> setData(Qt::DisplayRole, list_diagram_.at(i) -> title() );
|
||||
QString diagram_title = list_diagram_.at(i) -> title();
|
||||
if (diagram_title.isEmpty()) diagram_title = tr("Sch\351ma sans titre");
|
||||
|
||||
item_Name -> setData(Qt::DisplayRole, diagram_title);
|
||||
item_State -> setData(Qt::CheckStateRole, Qt::Checked);
|
||||
|
||||
ui -> tableDiagram -> setRowCount(j+1);
|
||||
|
||||
Reference in New Issue
Block a user