[qet] [2462] dialog autonum: when open the dialog the showed autonum is the current diagram |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 2462
Author: blacksun
Date: 2013-08-25 23:48:12 +0200 (Sun, 25 Aug 2013)
Log Message:
-----------
dialog autonum: when open the dialog the showed autonum is the current diagram
Modified Paths:
--------------
trunk/sources/ui/dialogautonum.cpp
trunk/sources/ui/selectautonumw.cpp
trunk/sources/ui/selectautonumw.h
Modified: trunk/sources/ui/dialogautonum.cpp
===================================================================
--- trunk/sources/ui/dialogautonum.cpp 2013-08-25 17:56:36 UTC (rev 2461)
+++ trunk/sources/ui/dialogautonum.cpp 2013-08-25 21:48:12 UTC (rev 2462)
@@ -34,7 +34,7 @@
{
ui -> setupUi(this);
- ui -> configuration_layout -> addWidget (new SelectAutonumW(dg_ -> project() -> diagrams(), ui -> configuration_tab));
+ ui -> configuration_layout -> addWidget (new SelectAutonumW(dg_ -> project() -> diagrams(), dg, ui -> configuration_tab));
dgselect_ = new diagramselection( dg_ -> project(), ui -> annotation_tab);
ui -> verticalLayout_Selection -> addWidget(dgselect_);
Modified: trunk/sources/ui/selectautonumw.cpp
===================================================================
--- trunk/sources/ui/selectautonumw.cpp 2013-08-25 17:56:36 UTC (rev 2461)
+++ trunk/sources/ui/selectautonumw.cpp 2013-08-25 21:48:12 UTC (rev 2462)
@@ -5,7 +5,7 @@
/**
* Constructor
*/
-SelectAutonumW::SelectAutonumW(const QList <Diagram *> &diagrams, QWidget *parent) :
+SelectAutonumW::SelectAutonumW(const QList <Diagram *> &diagrams, Diagram *current_diagram ,QWidget *parent) :
QWidget(parent),
ui(new Ui::SelectAutonumW),
diagram_list(diagrams)
@@ -13,6 +13,7 @@
ui->setupUi(this);
initDiagramChooser();
+ if (current_diagram) ui -> diagram_chooser -> setCurrentIndex (diagram_list.indexOf(current_diagram));
setCurrentContext();
}
Modified: trunk/sources/ui/selectautonumw.h
===================================================================
--- trunk/sources/ui/selectautonumw.h 2013-08-25 17:56:36 UTC (rev 2461)
+++ trunk/sources/ui/selectautonumw.h 2013-08-25 21:48:12 UTC (rev 2462)
@@ -15,7 +15,7 @@
//METHODS
public:
- explicit SelectAutonumW(const QList <Diagram *> &, QWidget *parent = 0);
+ explicit SelectAutonumW(const QList <Diagram *> &, Diagram * = 0, QWidget *parent = 0);
~SelectAutonumW();
private: