Check-in Number:
|
3982 | |
Date: |
2003-Jan-31 19:37:01 (local)
2003-Jan-31 18:37:01 (UTC) |
User: | ms |
Branch: | |
Comment: |
Applied the same fix for open op to new op. |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/as/as-gui/ChangeLog 1.25 -> 1.26
--- ChangeLog 2003/01/31 14:03:03 1.25
+++ ChangeLog 2003/01/31 18:37:01 1.26
@@ -1,6 +1,7 @@
Geschichte des OSSP titraq in Vorwaerts Cronordnung
030131 Fix logic when calling saveFile, but returning in a dirty state
+ Fix some logical combinations of open and new doc save operations
030130 Made day date section focus the default value
Remove hackful zero date value, replace with current date
|
|
ossp-pkg/as/as-gui/as_slot.cpp 1.101 -> 1.102
--- as_slot.cpp 2003/01/31 18:03:36 1.101
+++ as_slot.cpp 2003/01/31 18:37:01 1.102
@@ -313,7 +313,7 @@
//
void Titraqform::newDoc(void)
{
- int nResult = 0;
+ int nResult = 0; // Holds return value from save first messagebox
// Check modification state of current data
if (m_pMaintable->isDirty()) {
@@ -323,24 +323,28 @@
switch (nResult) {
case 0: // First button selected, so save first
- this->saveFile(); // Save changes first
+ this->saveFile(); // Save changes first
break;
case 1: // Second button selected, so don't save
break;
case 2: // Third button selected, so return sofort
default:
+ m_pStatbar->message(trUtf8("New aborted"), 4000);
return;
break;
}
}
- // Fall through to implicit new doc code
- this->enableIface(true); // Enable the interface
- m_pMaintable->setNumRows(0); // Remove all data in table
- this->setCaption(trUtf8("No file name"));
- m_pStatbar->message(trUtf8("New document"), 4000);
- this->setOpen(); // Signal an open doc state
- this->addEntry(1); // Default new op adds a row
- m_pMaintable->setDirty(false); // Start out clean
+
+ if (!m_pMaintable->isDirty() || nResult == 1) { // Check modification state
+ // Fall through to implicit new doc code
+ this->setCaption(trUtf8("No file name"));
+ m_pStatbar->message(trUtf8("New document"), 4000);
+ this->enableIface(true); // Enable the interface
+ m_pMaintable->setNumRows(0); // Remove all data in table
+ this->setFilename(""); // Signal a closed doc state
+ this->addEntry(1); // Default new op adds a row
+ m_pMaintable->setDirty(false); // Start out clean
+ }
}
//
@@ -348,7 +352,7 @@
//
void Titraqform::openDoc(void)
{
- int nResult = 0; // Holds return value from save first messagebox
+ int nResult = 0; // Holds return value from save first messagebox
//
// This block will guide the user to saving the contents of the timesheet
|
|