Project

General

Profile

Actions

Bug #735

closed

bug in treeview; git and wt-3.1.8

Added by Mohammed Rashad about 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
-
Start date:
02/21/2011
Due date:
% Done:

0%

Estimated time:

Description

There is a bug is git version and wt-3.1.8 of WTreeView.

In the code given below the click event is not triggered when checkable WStandarItem of WtreeView. When clicking on the item the click event is triggered but no click event is called when toggle the checkbox of item in WTreeView. this may be a bug is WTreeView or WStandardItem

anyone please run the code and toggle the checkbox in the treeview item. code is self explanatory and the error is reproducable

But no error in wt-3.1.7a but i need to use wt-3.1.8 or git version for my application.

please fix the bug and let me know

#include

#include

#include

#include

#include

#include

using namespace Wt;

using namespace std;

class HelloApplication : public WApplication {

public:

HelloApplication(const WEnvironment& env);

void ItemChecked();

private:

WTreeView *treeview_;

};

HelloApplication::HelloApplication(const WEnvironment& env)

: WApplication(env) {

setTitle("Hello world");

treeview_ = new WTreeView(root());

WStandardItemModel *model = new WStandardItemModel(0, 1, this);

model->setHeaderData(0, Horizontal,

boost::any(string("Layer Tree")));

WStandardItem *result = new WStandardItem("item1");

result->setFlags(ItemIsSelectable|ItemIsUserCheckable);

result->setCheckState(Checked);

model->appendRow(result);

treeview_->setModel(model);

treeview_->clicked().connect(this,&HelloApplication::ItemChecked);

}

void HelloApplication::ItemChecked() {

WApplication::instance()->doJavaScript("alert(0);");

}

WApplication *createApplication(const WEnvironment& env) {

return new HelloApplication(env);

}

int main(int argc, char **argv) {

return WRun(argc, argv, &createApplication);

}

Actions #1

Updated by Koen Deforche about 13 years ago

  • Status changed from New to Resolved
  • Assignee set to Koen Deforche

Resolved per workaround as discussed at http://redmine.emweb.be/boards/2/topics/1511

Actions #2

Updated by Koen Deforche almost 13 years ago

  • Status changed from Resolved to Closed

Available in Wt 3.1.9

Actions

Also available in: Atom PDF