fix display of cloned event
authorKonrad Rosenbaum <konrad@silmor.de>
Sun, 20 Dec 2015 14:46:07 +0000 (15:46 +0100)
committerKonrad Rosenbaum <konrad@silmor.de>
Sun, 20 Dec 2015 14:46:07 +0000 (15:46 +0100)
src/dialogs/eventedit.cpp

index 1ab4b9e..b09e85c 100644 (file)
@@ -64,9 +64,16 @@ MEventEditor::MEventEditor(QWidget*pw, OpenMode mode, qint64 id)
                case OpenMode::Auto:
                        if(id>=0)break;
                        //else fallthru
-               case OpenMode::Create:
+               case OpenMode::Create:{
                        event.setid(Nullable<qint64>());
+                       auto prices=event.price();
+                       for(auto&price:prices){
+                               price.setamounttickets(0);
+                               price.setamountticketsblock(0);
+                       }
+                       event.setprice(prices);
                        break;
+               }
                default:break;
        }